package com.lins.common.mp.result;

import com.lins.common.common.enums.SuccessCode;
import com.lins.common.common.result.Head;
import com.lins.common.common.result.Result;

/**
 * @author linsir
 * @title: RespResult
 * @projectName lins
 * @description: api接口 统一返回数据
 * @date 2021/12/9 22:19
 */
public class RespResult<B> implements Result<Head,B> {

    private Head head;

    private B data;

    public RespResult(B data)
    {
        this.head = new Head(SuccessCode.SUCCESS);
        this.data = data;
    }

    @Override
    public Head getH() {
        return this.head;
    }

    @Override
    public B getB() {
        return this.data;
    }
}
